package org.teremail.tx;

import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.NClob;
import java.sql.PreparedStatement;
import java.sql.SQLClientInfoException;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Savepoint;
import java.sql.Statement;
import java.sql.Struct;
import java.util.Map;
import java.util.Properties;

public class DelegateConnection implements Connection {
    
    private Connection cn;
    
    public Connection getConnection() {
        return cn;
    }

    public void clearWarnings() throws SQLException {
        cn.clearWarnings();
    }

    public void close() throws SQLException {
        cn.close();
    }

    public void commit() throws SQLException {
        cn.commit();
    }

    public Array createArrayOf(String typeName, Object[] elements)
            throws SQLException {
        return cn.createArrayOf(typeName, elements);
    }

    public Blob createBlob() throws SQLException {
        return cn.createBlob();
    }

    public Clob createClob() throws SQLException {
        return cn.createClob();
    }

    public NClob createNClob() throws SQLException {
        return cn.createNClob();
    }

    public SQLXML createSQLXML() throws SQLException {
        return cn.createSQLXML();
    }

    public Statement createStatement() throws SQLException {
        return cn.createStatement();
    }

    public Statement createStatement(int resultSetType,
            int resultSetConcurrency, int resultSetHoldability)
            throws SQLException {
        return cn.createStatement(resultSetType, resultSetConcurrency,
                resultSetHoldability);
    }

    public Statement createStatement(int resultSetType, int resultSetConcurrency)
            throws SQLException {
        return cn.createStatement(resultSetType, resultSetConcurrency);
    }

    public Struct createStruct(String typeName, Object[] attributes)
            throws SQLException {
        return cn.createStruct(typeName, attributes);
    }

    public boolean getAutoCommit() throws SQLException {
        return cn.getAutoCommit();
    }

    public String getCatalog() throws SQLException {
        return cn.getCatalog();
    }

    public Properties getClientInfo() throws SQLException {
        return cn.getClientInfo();
    }

    public String getClientInfo(String name) throws SQLException {
        return cn.getClientInfo(name);
    }

    public int getHoldability() throws SQLException {
        return cn.getHoldability();
    }

    public DatabaseMetaData getMetaData() throws SQLException {
        return cn.getMetaData();
    }

    public int getTransactionIsolation() throws SQLException {
        return cn.getTransactionIsolation();
    }

    public Map<String, Class<?>> getTypeMap() throws SQLException {
        return cn.getTypeMap();
    }

    public SQLWarning getWarnings() throws SQLException {
        return cn.getWarnings();
    }

    public boolean isClosed() throws SQLException {
        return cn.isClosed();
    }

    public boolean isReadOnly() throws SQLException {
        return cn.isReadOnly();
    }

    public boolean isValid(int timeout) throws SQLException {
        return cn.isValid(timeout);
    }

    public boolean isWrapperFor(Class<?> iface) throws SQLException {
        return cn.isWrapperFor(iface);
    }

    public String nativeSQL(String sql) throws SQLException {
        return cn.nativeSQL(sql);
    }

    public CallableStatement prepareCall(String sql, int resultSetType,
            int resultSetConcurrency, int resultSetHoldability)
            throws SQLException {
        return cn.prepareCall(sql, resultSetType, resultSetConcurrency,
                resultSetHoldability);
    }

    public CallableStatement prepareCall(String sql, int resultSetType,
            int resultSetConcurrency) throws SQLException {
        return cn.prepareCall(sql, resultSetType, resultSetConcurrency);
    }

    public CallableStatement prepareCall(String sql) throws SQLException {
        return cn.prepareCall(sql);
    }

    public PreparedStatement prepareStatement(String sql, int resultSetType,
            int resultSetConcurrency, int resultSetHoldability)
            throws SQLException {
        return cn.prepareStatement(sql, resultSetType, resultSetConcurrency,
                resultSetHoldability);
    }

    public PreparedStatement prepareStatement(String sql, int resultSetType,
            int resultSetConcurrency) throws SQLException {
        return cn.prepareStatement(sql, resultSetType, resultSetConcurrency);
    }

    public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
            throws SQLException {
        return cn.prepareStatement(sql, autoGeneratedKeys);
    }

    public PreparedStatement prepareStatement(String sql, int[] columnIndexes)
            throws SQLException {
        return cn.prepareStatement(sql, columnIndexes);
    }

    public PreparedStatement prepareStatement(String sql, String[] columnNames)
            throws SQLException {
        return cn.prepareStatement(sql, columnNames);
    }

    public PreparedStatement prepareStatement(String sql) throws SQLException {
        return cn.prepareStatement(sql);
    }

    public void releaseSavepoint(Savepoint savepoint) throws SQLException {
        cn.releaseSavepoint(savepoint);
    }

    public void rollback() throws SQLException {
        cn.rollback();
    }

    public void rollback(Savepoint savepoint) throws SQLException {
        cn.rollback(savepoint);
    }

    public void setAutoCommit(boolean autoCommit) throws SQLException {
        cn.setAutoCommit(autoCommit);
    }

    public void setCatalog(String catalog) throws SQLException {
        cn.setCatalog(catalog);
    }

    public void setClientInfo(Properties properties)
            throws SQLClientInfoException {
        cn.setClientInfo(properties);
    }

    public void setClientInfo(String name, String value)
            throws SQLClientInfoException {
        cn.setClientInfo(name, value);
    }

    public void setHoldability(int holdability) throws SQLException {
        cn.setHoldability(holdability);
    }

    public void setReadOnly(boolean readOnly) throws SQLException {
        cn.setReadOnly(readOnly);
    }

    public Savepoint setSavepoint() throws SQLException {
        return cn.setSavepoint();
    }

    public Savepoint setSavepoint(String name) throws SQLException {
        return cn.setSavepoint(name);
    }

    public void setTransactionIsolation(int level) throws SQLException {
        cn.setTransactionIsolation(level);
    }

    public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
        cn.setTypeMap(map);
    }

    public <T> T unwrap(Class<T> iface) throws SQLException {
        return cn.unwrap(iface);
    }

    public DelegateConnection(Connection cn) {
        this.cn = cn;
    }


}
